home *** CD-ROM | disk | FTP | other *** search
- /* XARC - Archive extraction utility
-
- $define(tag,$$segment(@1,$$index(@1,=)+1))#
- $define(version,Version $tag(
- TED_VERSION DB =4.32), created on $tag(
- TED_DATE DB =11/08/85) at $tag(
- TED_TIME DB =23:37:47))#
- $undefine(tag)#
- $version
-
- (C) COPYRIGHT 1985 by System Enhancement Associates; ALL RIGHTS RESERVED
-
- By: Thom Henderson
-
- Description:
- This program is used to extract files from archives which were
- created using the ARC general archive maintenance program.
- Please refer to the ARC source for a description of archives
- and archive formats.
-
- Instructions:
- Run this program with no arguments for complete instructions.
-
- Programming notes:
- This is essentially a stripped down version of ARC, including only
- those routines required to extract files.
-
- Language:
- Computer Innovations Optimizing C86
- */
- #include <stdio.h>
- #include "arc.h"
-
- main(num,arg) /* system entry point */
- int num; /* number of arguments */
- char *arg[]; /* pointers to arguments */
- {
- char *makefnam(); /* filename fixup routine */
- char buf[$strlen]; /* fixed filename storage */
- char *d, *dir, *filedir(); /* file directory stuff */
- int n; /* argument index */
-
- if(num<2)
- { printf("XARC - Archive extractor, $version\n");
- printf("(C) COPYRIGHT 1985 by System Enhancement Associates;");
- printf(" ALL RIGHTS RESERVED\n\n");
- printf("Please refer all inquiries to:\n\n");
- printf(" System Enhancement Associates\n");
- printf(" 21 New Street\n");
- printf(" Wayne, NJ 07470\n\n");
- printf("You may copy and distribute this program freely,");
- printf(" provided that:\n");
- printf(" 1) No fee is charged for such copying and");
- printf(" distribution, and\n");
- printf(" 2) It is distributed ONLY in its original,");
- printf(" unmodified state.\n\n");
- printf("If you like this program, and find it of use, then your");
- printf(" contribution will\n");
- printf("be appreciated. If you are using this product in a");
- printf(" commercial environment,\n");
- printf("then the contribution is not voluntary.\n\n");
- printf("If you fail to abide by the terms of this license, then");
- printf(" your conscience\n");
- printf("will haunt you for the rest of your life.\n\n");
-
- printf("Usage: XARC <arcname> [<arcname>. . .]\n\n");
- printf("Where <arcname> is the name of an archive.");
- printf(" If no filename extension is\n");
- printf("supplied, then .ARC is assumed.\n");
- return 1;
- }
-
- for(n=1; n<num; n++) /* for each argument */
- { makefnam(arg[n],".ARC",buf);
- if(d=dir=filedir(buf,0)) /* if any matching archives */
- { while(*d) /* work through each archive */
- { makefnam(d,buf,arcname);
- printf("Archive: %s\n",arcname);
- extarc(); /* extract all files */
- while(*d++); /* go to next archive */
- }
- free(dir);
- }
- else printf("No such archive: %s\n",buf);
- }
- }
-
- $define(xarc,on)#
- $insert(arcext.mac)#
-